/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.business.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import lombok.ToString;
import me.zhengjie.base.BaseBusiness;
import me.zhengjie.business.domain.sup.Gsgl;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.domain.Role;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.sql.Timestamp;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.Set;

/**
* @website https://el-admin.vip
* @description /
* @author xiahongbo
* @date 2022-04-12
**/
@Entity
@Data
@DiscriminatorValue("GSLX03")
public class Hljg extends Gsgl implements Serializable {

    @Column(name = "BIS_GSGL_HLJGBM")
    @ApiModelProperty(value = "（护理机构）护理机构编号")
    private String bisGsglHljgbm;

    @Column(name = "BIS_GSGL_HTKSRQ")
    @ApiModelProperty(value = "（护理机构）合同起始时间")
    private Timestamp bisGsglHtksrq;

    @Column(name = "BIS_GSGL_HTJSRQ")
    @ApiModelProperty(value = "（护理机构）合同截止时间")
    private Timestamp bisGsglHtjsrq;

    @Column(name = "BIS_GSGL_CHJGDDFWLX")
    @ApiModelProperty(value = "（护理机构）长期护理机构定点服务类型")
    private String bisGsglChjgddfwlx;

    @Column(name = "BIS_GSGL_CWS")
    @ApiModelProperty(value = "（护理机构）床位数")
    private String bisGsglCws;

    @Column(name = "BIS_GSGL_HLYRS")
    @ApiModelProperty(value = "（护理机构）护理员人数")
    private String bisGsglHlyrs;

    @Column(name = "BIS_GSGL_CQHLFWLX")
    @ApiModelProperty(value = "（护理机构）长期护理服务类型")
    private String bisGsglCqhlfwlx;

    @Column(name = "BIS_GSGL_JD")
    @ApiModelProperty(value = "（护理机构）经度")
    private String bisGsglJd;

    @Column(name = "BIS_GSGL_WD")
    @ApiModelProperty(value = "（护理机构）纬度")
    private String bisGsglWd;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "BIS_GSGL_SBGS_ID")
    @ApiModelProperty(value = "（护理机构）商保公司ID")
    @JSONField(serialize = false)
    @ToString.Exclude
    private Sbgs sbgs;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "BIS_GSGL_PGGS_ID")
    @ApiModelProperty(value = "（护理机构）评估公司ID")
    @JSONField(serialize = false)
    @ToString.Exclude
    private Pggs pggs;

    public void copy(Gsgl source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
    public int hashCode() {
        return Objects.hash(getBisGsglId(), getBisGsglTyshxydm());
    }
}